<template>
	<view class="article-detail p-30" v-if="!isLoading">
		<view class="content m-t-30">
			<rich-text :nodes="$xyfun.richTextHandle(article.content)"></rich-text>
		</view>
	</view>
</template>

<script>
	
	export default {
		
		data() {
			return {
				isLoading:true,
				id: '',
				article:{},
			}
		},
		async onLoad(options) {
			var that = this;
			if(options?.id){
				this.id = options.id;
			}
			that.loadData();
		},
		methods: {
			
			async loadData(){
				this.$api.get({
					url: '/notice/detail',
					loadingTip:'加载中...',
					data: {
						id:this.id,
					},
					success: res => {
						this.isLoading = false;
						this.article = res;
            this.isLoading = false;
					}
				});
			},
			
			
			
		}
	}
</script>

<style scoped lang="scss">
	.article-detail{
		.content{text-align: justify;}
	}
</style>
